package com.example.teamilkmall.controller.exception;

/**
 * @author wangl
 * @date 2024/10/12
 * 异常枚举
 */
public enum ErrorsEnum {
    /**
     * 登录异常
     */
    LOGIN_EXCEPTION(10000, "账号或密码错误"),
    AUTH_EXCEPTION(401, "用户未登录"),
    PWD_EXCEPTION(101,"密码错误"),
    USER_ALREADY_EXISTS(501,"用户已存在");

    private final Integer code;
    private final String message;

    ErrorsEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer code() {
        return code;
    }

    public String message() {
        return message;
    }
}